home *** CD-ROM | disk | FTP | other *** search
/ Merciful 2 / Merciful - Disc 2.iso / software / h / highspeedpascalv2.0b.dms / highspeedpascalv2.0b.adf / Interface / AmigaPrinter.pas < prev    next >
Pascal/Delphi Source File  |  1992-01-16  |  6KB  |  321 lines

  1. Unit AmigaPrinter;
  2.  
  3. Interface
  4. Uses AmigaDOS, Serial, Parallel, Intuition, Graphics, Input, Timer, Exec;
  5.  
  6. Type
  7.   tDeviceData = Record
  8.           dd_Device: tLibrary;
  9.           dd_Segment: Pointer;
  10.           dd_ExecBase: Pointer;
  11.           dd_CmdVectors: Pointer;
  12.           dd_CmdBytes: Pointer;
  13.           dd_NumCommands: Integer;
  14.         End;
  15.  
  16.   pPrinterSegment = ^tPrinterSegment;
  17.   tPrinterData = Record
  18.           pd_Device: tDeviceData;
  19.           pd_Unit: tMsgPort;
  20.           pd_PrinterSegment: LongInt;
  21.           pd_PrinterType: Integer;
  22.           pd_SegmentData: pPrinterSegment;
  23.           pd_PrintBuf: pShortInt;
  24.           pd_PWrite: pPointer;
  25.           pd_PBothReady: pPointer;
  26.         Case Integer of
  27.         0: (
  28.           pd_p: Record
  29.           IOR0: tIOExtPar;
  30.           IOR1: tIOExtPar;
  31.           End;
  32.         );
  33.         1: (
  34.           pd_s: Record
  35.           IOR0: tIOExtSer;
  36.           IOR1: tIOExtSer;
  37.           End;
  38.           pd_TIOR: ttimerequest;
  39.           pd_IORPort: tMsgPort;
  40.           pd_TC: tTask;
  41.           pd_Stk: Array [0..2047] of ShortInt;
  42.           pd_Flags: ShortInt;
  43.           pd_pad: ShortInt;
  44.           pd_Preferences: tPreferences;
  45.           pd_PWaitEnabled: ShortInt;
  46.         );
  47.         End;
  48.  
  49.   tPrinterExtendedData = Record
  50.           ped_PrinterName: pShortInt;
  51.           ped_Init: Pointer;
  52.           ped_Expunge: Pointer;
  53.           ped_Open: pPointer;
  54.           ped_Close: Pointer;
  55.           ped_PrinterClass: ShortInt;
  56.           ped_ColorClass: ShortInt;
  57.           ped_MaxColumns: ShortInt;
  58.           ped_NumCharSets: ShortInt;
  59.           ped_NumRows: Integer;
  60.           ped_MaxXDots: LongInt;
  61.           ped_MaxYDots: LongInt;
  62.           ped_XDotsInch: Integer;
  63.           ped_YDotsInch: Integer;
  64.           ped_Commands: pppShortInt;
  65.           ped_DoSpecial: pPointer;
  66.           ped_Render: pPointer;
  67.           ped_TimeoutSecs: LongInt;
  68.           ped_8BitChars: ppShortInt;
  69.           ped_PrintMode: LongInt;
  70.           ped_ConvFunc: pPointer;
  71.         End;
  72.  
  73.   pDevice = ^tDevice;
  74.   pUnit = ^tUnit;
  75.   tIOPrtCmdReq = Record
  76.           io_Message: tMessage;
  77.           io_Device: pDevice;
  78.           io_Unit: pUnit;
  79.           io_Command: Integer;
  80.           io_Flags: ShortInt;
  81.           io_Error: ShortInt;
  82.           io_PrtCommand: Integer;
  83.           io_Parm0: ShortInt;
  84.           io_Parm1: ShortInt;
  85.           io_Parm2: ShortInt;
  86.           io_Parm3: ShortInt;
  87.         End;
  88.  
  89.   tPrinterSegment = Record
  90.           ps_NextSegment: LongInt;
  91.           ps_runAlert: LongInt;
  92.           ps_Version: Integer;
  93.           ps_Revision: Integer;
  94.           ps_PED: tPrinterExtendedData;
  95.         End;
  96.  
  97.   tcolorEntry = Record
  98.         Case Integer of
  99.         0: (
  100.           colorLong: LongInt;
  101.         );
  102.         1: (
  103.           colorByte: Array [0..3] of ShortInt;
  104.         );
  105.         2: (
  106.           colorSByte: Array [0..3] of ShortInt        );
  107.         End;
  108.  
  109.   pRastPort = ^tRastPort;
  110.   pColorMap = ^tColorMap;
  111.   tIODRPReq = Record
  112.           io_Message: tMessage;
  113.           io_Device: pDevice;
  114.           io_Unit: pUnit;
  115.           io_Command: Integer;
  116.           io_Flags: ShortInt;
  117.           io_Error: ShortInt;
  118.           io_RastPort: pRastPort;
  119.           io_ColorMap: pColorMap;
  120.           io_Modes: LongInt;
  121.           io_SrcX: Integer;
  122.           io_SrcY: Integer;
  123.           io_SrcWidth: Integer;
  124.           io_SrcHeight: Integer;
  125.           io_DestCols: LongInt;
  126.           io_DestRows: LongInt;
  127.           io_Special: Integer;
  128.         End;
  129.  
  130.   pcolorEntry = ^tcolorEntry;
  131.   tPrtInfo = Record
  132.           pi_render: pPointer;
  133.           pi_rp: pRastPort;
  134.           pi_temprp: pRastPort;
  135.           pi_RowBuf: pInteger;
  136.           pi_HamBuf: pInteger;
  137.           pi_ColorMap: pcolorEntry;
  138.           pi_ColorInt: pcolorEntry;
  139.           pi_HamInt: pcolorEntry;
  140.           pi_Dest1Int: pcolorEntry;
  141.           pi_Dest2Int: pcolorEntry;
  142.           pi_ScaleX: pInteger;
  143.           pi_ScaleXAlt: pInteger;
  144.           pi_dmatrix: pShortInt;
  145.           pi_TopBuf: pInteger;
  146.           pi_BotBuf: pInteger;
  147.           pi_RowBufSize: Integer;
  148.           pi_HamBufSize: Integer;
  149.           pi_ColorMapSize: Integer;
  150.           pi_ColorIntSize: Integer;
  151.           pi_HamIntSize: Integer;
  152.           pi_Dest1IntSize: Integer;
  153.           pi_Dest2IntSize: Integer;
  154.           pi_ScaleXSize: Integer;
  155.           pi_ScaleXAltSize: Integer;
  156.           pi_PrefsFlags: Integer;
  157.           pi_special: LongInt;
  158.           pi_xstart: Integer;
  159.           pi_ystart: Integer;
  160.           pi_width: Integer;
  161.           pi_height: Integer;
  162.           pi_pc: LongInt;
  163.           pi_pr: LongInt;
  164.           pi_ymult: Integer;
  165.           pi_ymod: Integer;
  166.           pi_ety: Integer;
  167.           pi_xpos: Integer;
  168.           pi_threshold: Integer;
  169.           pi_tempwidth: Integer;
  170.           pi_flags: Integer;
  171.         End;
  172.  
  173.  
  174.  
  175. Const
  176.   PCC_YMCB = $4;
  177.   aSTBM = $40;
  178.   aCAM = $42;
  179.   PCMWHITE = $3;
  180.   P_BUFSIZE = $100;
  181.   SPECIAL_FULLCOLS = $4;
  182.   PCC_BGRW = $C;
  183.   aSBC = $D;
  184.   aSLRM = $41;
  185.   SPECIAL_FRACROWS = $20;
  186.   PPCB_GFX = $0;
  187.   aSLPP = $39;
  188.   aIND = $2;
  189.   aSFC = $C;
  190.   PDERR_DIMENSIONOVFLOW = $5;
  191.   PPCF_GFX = $1;
  192.   PCMBLUE = $0;
  193.   aNEL = $3;
  194.   aPLD = $21;
  195.   PCMCYAN = $2;
  196.   aBMS = $3F;
  197.   aFNT10 = $2C;
  198.   PCC_BGR = $A;
  199.   PRD_QUERY = $C;
  200.   PDERR_TOOKCONTROL = $8;
  201.   P_STKSIZE = $800;
  202.   PPC_BWALPHA = $0;
  203.   PPC_COLORGFX = $3;
  204.   aTBCALL = $49;
  205.   PCMMAGENTA = $1;
  206.   aRIN = $1;
  207.   aRAW = $4C;
  208.   SPECIAL_MILCOLS = $1;
  209.   aSGR22 = $B;
  210.   aSGR23 = $7;
  211.   aLMS = $3C;
  212.   aSGR24 = $9;
  213.   PRD_DUMPRPORT = $B;
  214.   aRIS = $0;
  215.   aHTS = $43;
  216.   SPECIAL_FULLROWS = $8;
  217.   aPLU = $20;
  218.   aSHORP0 = $E;
  219.   aRMS = $3D;
  220.   SPECIAL_NOFORMFEED = $800;
  221.   aSHORP1 = $10;
  222.   PCC_YMC = $2;
  223.   PCC_4COLOR = $4;
  224.   aSHORP2 = $F;
  225.   aTMS = $3E;
  226.   SPECIAL_DENSITYMASK = $700;
  227.   aSHORP3 = $12;
  228.   PDERR_INTERNALMEMORY = $6;
  229.   PCMRED = $2;
  230.   aSHORP4 = $11;
  231.   PDERR_BADDIMENSION = $4;
  232.   aSHORP5 = $14;
  233.   aSHORP6 = $13;
  234.   aPERF0 = $3B;
  235.   aTBSALL = $4A;
  236.   aTSS = $30;
  237.   PRD_RAWWRITE = $9;
  238.   SPECIAL_ASPECT = $80;
  239.   aVTS = $44;
  240.   SPECIAL_CENTER = $40;
  241.   aEXTEND = $4B;
  242.   aRI = $4;
  243.   SPECIAL_NOPRINT = $2000;
  244.   PDERR_INVERTHAM = $3;
  245.   SPECIAL_DIMENSIONSMASK = $BF;
  246.   PPC_COLORALPHA = $2;
  247.   SPECIAL_MILROWS = $2;
  248.   aDEN1 = $1A;
  249.   aVERP0 = $37;
  250.   PDERR_NOERR = $0;
  251.   PCC_BW = $1;
  252.   PCC_WB = $9;
  253.   aDEN2 = $19;
  254.   aVERP1 = $38;
  255.   aTBC0 = $45;
  256.   aDEN3 = $18;
  257.   aTBC1 = $47;
  258.   aDEN4 = $17;
  259.   SPECIAL_TRUSTME = $1000;
  260.   aDEN5 = $16;
  261.   aPROP0 = $2F;
  262.   aTBC3 = $46;
  263.   aDEN6 = $15;
  264.   aPROP1 = $2E;
  265.   aTBC4 = $48;
  266.   aPROP2 = $2D;
  267.   PPCB_COLOR = $1;
  268.   PPCF_COLOR = $2;
  269.   PCMBLACK = $3;
  270.   PCC_BGR_WB = $B;
  271.   P_SAFESIZE = $80;
  272.   PRD_PRTCOMMAND = $A;
  273.   aFNT0 = $22;
  274.   aFNT1 = $23;
  275.   aJFY0 = $34;
  276.   aFNT2 = $24;
  277.   aJFY1 = $36;
  278.   aFNT3 = $25;
  279.   aSGR0 = $5;
  280.   aFNT4 = $26;
  281.   aJFY3 = $35;
  282.   PDERR_BUFFERMEMORY = $7;
  283.   aSGR1 = $A;
  284.   aFNT5 = $27;
  285.   aFNT6 = $28;
  286.   aJFY5 = $31;
  287.   aSGR3 = $6;
  288.   aFNT7 = $29;
  289.   aJFY6 = $33;
  290.   aSGR4 = $8;
  291.   aFNT8 = $2A;
  292.   aJFY7 = $32;
  293.   aFNT9 = $2B;
  294.   PCC_YMC_BW = $3;
  295.   SPECIAL_FRACCOLS = $10;
  296.   PCC_ADDITIVE = $8;
  297.   PCMGREEN = $1;
  298.   SPECIAL_DENSITY1 = $100;
  299.   PDERR_CANCEL = $1;
  300.   SPECIAL_DENSITY2 = $200;
  301.   SPECIAL_DENSITY3 = $300;
  302.   aSUS0 = $1F;
  303.   SPECIAL_DENSITY4 = $400;
  304.   aSUS1 = $1C;
  305.   SPECIAL_DENSITY5 = $500;
  306.   PCMYELLOW = $0;
  307.   aSUS2 = $1B;
  308.   aPERF = $3A;
  309.   SPECIAL_DENSITY6 = $600;
  310.   aSUS3 = $1E;
  311.   SPECIAL_DENSITY7 = $700;
  312.   aSUS4 = $1D;
  313.   PDERR_NOTGRAPHICS = $2;
  314.   PPC_BWGFX = $1;
  315.   PCC_MULTI_PASS = $10;
  316.  
  317.  
  318.  
  319.  
  320. End.
  321.